package com.hjc.springbootstudyweb.service.ServiceImpl;

import com.hjc.springbootstudyweb.entity.ProductModel;
import com.hjc.springbootstudyweb.mapper.ProductsMapping;
import com.hjc.springbootstudyweb.service.ProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/1
 * Time: 21:59
 * To change this template use File | Settings | File Templates.
 */
@Service
public class ProductsServiceImpl implements ProductsService {
    @Autowired
    private ProductsMapping productsMapping;
    @Override
    public List<ProductModel> queryProduct() {
        return productsMapping.queryProduct();
    }

    @Override
    public int addProduct(ProductModel productModel) {
        return productsMapping.addProduct(productModel);
    }

    @Override
    public int deleteProduct(int pid) {
        return productsMapping.deleteProduct(pid);
    }
}
